import { Service } from "@/middleware/response";
import { uploadFile } from "@/utils/oss";

export const uploadFileService: Service = async (req, res) => {
    if (!req.file) return res.sendResponse!(400, null, "请传入文件");
    const result = await uploadFile(req.file);
    res.sendResponse!(200, result, "上传成功");
};